import java.util.ArrayList;
import java.util.List;

public class MyRemoveFromList {
	public static void main(String[] args) {

		List<User> users = new ArrayList<>();

		User u1 = new User(1l, "Karol");
		System.out.println(u1.hashCode());
		User u2 = new User(1l, "Karol");
		System.out.println(u2.hashCode());

		users.add(u1);
		System.out.println(users.size());

		users.remove(u2);
		System.out.println(users.size());

		List<String> strings = new ArrayList<>();

		String s1 = "Hobbit";
		String s2 = "Hobbit";

		strings.add(s1);
		System.out.println(strings.size());

		strings.remove(s2);
		System.out.println(strings.size());

	}
}
